package com.example.landlord.demo.Mapper;

import com.example.landlord.demo.Controller.request.ForgetRequest;
import com.example.landlord.demo.Controller.request.LoginRequest;
import com.example.landlord.demo.Controller.request.RegisterRequest;
import com.example.landlord.demo.Controller.request.UserPageRequest;
import com.example.landlord.demo.Entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {

    User getByUsernameAndPassword(LoginRequest request);

    List<User> list();

    User ByUsernameGetEmail(ForgetRequest request);

    void insert(RegisterRequest request);

    User findUname(RegisterRequest request);


    User getPassword(ForgetRequest request);

    User ByUsernamePassword(User request);

    void updatePassword(User request);

    User getById(Integer id);

    User getByuname(String uname);

    void updateP(User user);

    void addScore(String uname, int score);
//    List<User> listByCondition(UserPageRequest baseRequest);
}
